﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ZLDC.Common.Estate;

namespace ZLDC.Estate
{
                public class CacheIndex
    {
                                                public static string Cache_TodayAlert_Json(int page, int pagesize, int userid, int deptid)
        {
            string json = "";
            string cachekey = CacheConst.CACHE_INDEX_TODAYALERT_JSON + userid + "_" + deptid;

            if (_Cache.GetCache(cachekey) == null || _Cache.GetCache(cachekey).ToString() == "")
            {
                json = ZLDC.Topo.BLL.Estate.AlertBLL.GetTodayAlert(page, pagesize, userid, deptid);
                _Cache.SetCache(cachekey, json, CacheConst.CACHE_INDEX_TODAYALERT_JSON_TIME);
            }
            else
                json = _Cache.GetCache(cachekey).ToString();

            return json;
        }

    }
}
